<template>
  <div class="x-drag-header py-6 px-4">
    <div class="flex justify-between items-center" data-drag>
      <div>
        <span>{{ title }}</span>
      </div>
      <a-button @click="close">
        <IconClose />
      </a-button>
    </div>
  </div>
</template>

<script setup lang="ts">
defineProps({
  title: String,
  icon: String
});

const emit = defineEmits(["onClose"]);

const close = () => {
  emit("onClose");
};
</script>

<style lang="scss" scoped>
.x-drag-header {
  background-color: #333;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  color: white;
}
</style>
